home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Visual Basic new SourceCode and Projects / Barcode Generator 2.0 / menues.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2000-06-24  |  4.1 KB  |  128 lines

  1. VERSION 5.00
  2. Begin VB.Form menues 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   1230
  5.    ClientLeft      =   165
  6.    ClientTop       =   735
  7.    ClientWidth     =   4215
  8.    Icon            =   "menues.frx":0000
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   1230
  11.    ScaleWidth      =   4215
  12.    StartUpPosition =   3  'Windows-Standard
  13.    Begin VB.Menu Popup 
  14.       Caption         =   "Popup"
  15.       Begin VB.Menu Tile 
  16.          Caption         =   "Tile"
  17.       End
  18.       Begin VB.Menu Cascade 
  19.          Caption         =   "Cascade"
  20.       End
  21.    End
  22.    Begin VB.Menu C 
  23.       Caption         =   "C"
  24.       Begin VB.Menu AddToDatabase 
  25.          Caption         =   "Add to DB"
  26.       End
  27.       Begin VB.Menu ChangeTitle 
  28.          Caption         =   "Change Title"
  29.       End
  30.       Begin VB.Menu Resize 
  31.          Caption         =   "Resize"
  32.       End
  33.       Begin VB.Menu plus 
  34.          Caption         =   "+"
  35.       End
  36.       Begin VB.Menu minus 
  37.          Caption         =   "- "
  38.       End
  39.    End
  40. Attribute VB_Name = "menues"
  41. Attribute VB_GlobalNameSpace = False
  42. Attribute VB_Creatable = False
  43. Attribute VB_PredeclaredId = True
  44. Attribute VB_Exposed = False
  45. Public Position As Long
  46. Public LastRecord As Long
  47. Private Sub AddToDatabase_Click()
  48. Dim FileNum As Integer, RecLength As Long, CodeDB As DBcode
  49. RecLength = LenB(CodeDB)
  50. FileNum = FreeFile
  51. Open toolfrm.Text2.text For Random As FileNum Len = RecLength
  52. Position = 1
  53. Get FileNum, 1, CodeDB
  54. If IsNumeric(CLng(Trim$(CodeDB.FullCode))) = True Then
  55.     LastRecord = CLng(Trim$(CodeDB.FullCode))
  56.     LastRecord = 1
  57. End If
  58. TheX = InputBox("Country:", "Enter Country")
  59. Loop While TheX = ""
  60. CodeDB.Country = TheX
  61. TheX = ""
  62. TheX = InputBox("Manufacturer:", "Enter Manufacturer")
  63. Loop While TheX = ""
  64. CodeDB.Manufacturer = TheX
  65. TheX = ""
  66. TheX = InputBox("Product:", "Enter Product name")
  67. Loop While TheX = ""
  68. CodeDB.Product = TheX
  69. TheX = ""
  70. CodeDB.FullCode = Mainfrm.ActiveForm.Label1.Caption & Mainfrm.ActiveForm.Label2.Caption & Mainfrm.ActiveForm.Label3.Caption
  71. CodeDB.PicPath = ""
  72. Put FileNum, LastRecord + 1, CodeDB
  73. LastRecord = LastRecord + 1
  74. CodeDB.FullCode = LastRecord
  75. Put FileNum, 1, CodeDB
  76. Close FileNum
  77. End Sub
  78. Private Sub ChangeTitle_Click()
  79. Title = InputBox("Set a new title:", "New Title", Mainfrm.ActiveForm.Caption)
  80. If Title <> "" Then
  81.     Mainfrm.ActiveForm.Caption = Title
  82. End If
  83. End Sub
  84. Private Sub minus_Click()
  85. If Mainfrm.ActiveForm.isEAN = True Then
  86.     Mainfrm.Text1.text = Subt(Mainfrm.Text1.text)
  87.     Mainfrm.ActiveForm.Width = (options.Text1.text)
  88.     Mainfrm.ActiveForm.Cls
  89.     Mainfrm.ActiveForm.ScaleMode = 3
  90.     Mainfrm.ActiveForm.Label1.Visible = True
  91.     PaintCode Mainfrm.ActiveForm, Mid$(Mainfrm.Text1.text, 1, 1), Mid$(Mainfrm.Text1.text, 2, 6), Mid$(Mainfrm.Text1.text, 8, 6)
  92.     Mainfrm.ActiveForm.Label1.Caption = Mid$(Mainfrm.Text1.text, 1, 1)
  93.     Mainfrm.ActiveForm.Label2.Caption = Mid$(Mainfrm.Text1.text, 2, 6)
  94.     Mainfrm.ActiveForm.Label3.Caption = Mid$(Mainfrm.Text1.text, 8, 6)
  95.     Mainfrm.ActiveForm.isEAN = True
  96.     Mainfrm.ActiveForm.Refresh
  97. End If
  98. End Sub
  99. Private Sub plus_Click()
  100. If Mainfrm.ActiveForm.isEAN = True Then
  101. Mainfrm.Text1.text = Add(Mainfrm.Text1.text)
  102.     Mainfrm.ActiveForm.Width = (options.Text1.text)
  103.     Mainfrm.ActiveForm.Cls
  104.     Mainfrm.ActiveForm.ScaleMode = 3
  105.     Mainfrm.ActiveForm.Label1.Visible = True
  106.     PaintCode Mainfrm.ActiveForm, Mid$(Mainfrm.Text1.text, 1, 1), Mid$(Mainfrm.Text1.text, 2, 6), Mid$(Mainfrm.Text1.text, 8, 6)
  107.     Mainfrm.ActiveForm.Label1.Caption = Mid$(Mainfrm.Text1.text, 1, 1)
  108.     Mainfrm.ActiveForm.Label2.Caption = Mid$(Mainfrm.Text1.text, 2, 6)
  109.     Mainfrm.ActiveForm.Label3.Caption = Mid$(Mainfrm.Text1.text, 8, 6)
  110.     Mainfrm.ActiveForm.isEAN = True
  111.     Mainfrm.ActiveForm.Refresh
  112. End If
  113. End Sub
  114. Private Sub Resize_Click()
  115. FWidth = InputBox("Set a new width:", "New Width", Mainfrm.ActiveForm.Width)
  116. If FWidth <> "" Then
  117.     Mainfrm.ActiveForm.Width = FWidth
  118. End If
  119. End Sub
  120. Private Sub Tile_Click()
  121. Mainfrm.Arrange (1)
  122. Unload Me
  123. End Sub
  124. Private Sub Cascade_Click()
  125. Mainfrm.Arrange (0)
  126. Unload Me
  127. End Sub
  128.